class VideoModel {
  int Id;
  String Title;
  String Thumb;
  int CategoryId;
  String Intro;
  String Year;
  String Duration;
  String Desc;
  String CategoryName = "";

  VideoModel(
    this.Id,
    this.Title,
    this.Thumb, {
    this.CategoryId = 0,
    this.Intro = "",
    this.Year = "",
    this.Duration = "",
    this.Desc = "",
    this.CategoryName = "",
  });

  factory VideoModel.fromJson(Map<String, dynamic> json) {
    return VideoModel(
      json["id"],
      json["title"],
      json["thumb"],
      CategoryId: json["category_id"] ?? 0,
      Intro: json["intro"] ?? "",
      Year: json["year"] ?? "",
      Duration: json["duration"] ?? "",
      Desc: json["desc"] ?? "",
      CategoryName: json["category_name"] ?? "",
    );
  }
}
